package com.guguskins.back.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-06-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("gu_invite_num")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class GuInviteNum extends Model<GuInviteNum> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(exist = false)
    private GuBox guBox;
    @TableField(exist = false)
    private GuGoods guGoods;
    /**
     * 邀请人数
     */
    private Integer inviteNum;

    /**
     * 1 箱子(box) 2 道具(prop)
     */
    private Integer invitePrizeType;

    /**
     * 奖励
     */
    private Long invitePrizeId;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private String prizeImage;

    @TableField(exist = false)
    private String prizeGoodsImage;

    @TableField(exist = false)
    private Integer state;

    @TableField(exist = false)
    private Integer prizeState;
   @TableField(exist = false)
   private String itemName;
   @TableField(exist = false)
   private String image;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
